<template>
	<view class="serch-box">
		<Search></Search>
		<view class="history">
			<view class="title" v-if="historyList.length">
			历史记录
			</view>
			<view class="item-box">
				<view class="list-item" v-for="item in historyList" :key="id">
					{{item.text}}
				</view>
			</view>
			
		</view>
		<view class="hotsearch">
			<view class="title" v-if="hotsearchList.length">
				大家都在找
			</view>
			<view class="item-box">
				<view class="list-item" v-for="item in hotsearchList" :key="id">
					{{item.text}}
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import Search from '../../components/search.vue'
	export default {
		name:'search',
		components:{
			Search
		},
		data() {
			return {
				historyList:[
					{
						id:0,
						text:'转租'
					}
				],
				hotsearchList:[
					{
						id:0,
						text:'近地铁'
					},
					{
						id:1,
						text:'独卫'
						
					},
					{
						id:2,
						text:'带阳台'
						
					}
				]
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="less" scoped>
*{
	margin: 0;
	padding: 0;
}

.title{
	width: 700rpx;
	display: flex;
	margin: 0 auto;
	font-size: 36rpx;
	font-weight: 600;
	margin-bottom: 20rpx;
}
.history,
.hotsearch{
	margin-top: 40rpx;
}
.item-box{
	width: 700rpx;
	display: flex;
	margin: 0 auto;
	justify-content: flex-start;
	flex-wrap: wrap;
	.list-item{
		height: 40rpx;
		padding: 10rpx;
		border-radius: 5rpx;
		background-color: #eee;
		margin-right: 20rpx;
		font-size: 24rpx;
		line-height: 40rpx;
}
}

</style>
